package com.xwolf.os.message;

import org.springframework.jms.annotation.JmsListener;
import org.springframework.messaging.handler.annotation.SendTo;
import org.springframework.stereotype.Service;

/**
 * @author ming
 * @Description:
 * @create 2018-07-03 9:15 PM
 **/
@Service
public class Consumer {
    @JmsListener(destination = "test.queue")
    public String receiveMsg(String text) {
        System.out.println("<<<<<<============ test.queue 收到消息： " + text);
        return text + "-response";
    }

    @JmsListener(destination = "test.queue.no.response")
    public void receiveMsgNoReponse(String text) {
        System.out.println("<<<<<<============ test.queue.no.response 收到消息： " + text);
    }

    @JmsListener(destination = "response.queue")
    public void receiveMsg2(String text) {
        System.out.println("<<<<<<============response.queue 收到消息： " + text);
    }
}
